package bit_pratice.day1;

import java.util.*;

/**
 * @author 美女
 * @date 2022/04/18 21:29
 **/
//√
public class Num2_DeleteSameChar {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        //输入两个字符串
        String s1=sc.nextLine();
        String s2=sc.nextLine();
        //s1存放整字符串；s2存储需要删除的字符
        //Set集合存放需要删除的字符，即存放字符串s2中所有字符
        Set<Character> set=new HashSet<>();
        for (int i = 0; i < s2.length(); i++) {
            set.add(s2.charAt(i));
        }
        StringBuilder sb=new StringBuilder();

        for(int i=0;i<s1.length();i++){
            char ch=s1.charAt(i);
            if(!set.contains(ch)){
                sb.append(ch);
            }
        }
        String str=sb.toString();
        System.out.println(str);
    }
}
